function main(params) {
    const self = this;
    const pageRootList = self.$$roots();

    api.EXEC_FORMULA("TREE_QUERY_CHILDRENS('e2682fd0-083c-4696-82b2-b001e8b8b495','" + params.id + "',['ID'])").then((res) => {

        const unitIds = res.result

        let rootPageElement = pageRootList[0];
        // 找到页面中的列表组件元素
        let pageTableList = rootPageElement.$$element("page_widget_list_70dw5x");
        if (pageTableList) {
            if (pageTableList.dataEngine && pageTableList.dataEngine.state) {
                // 如果要给列表的查询组件传参赋值，需要找到组件的model进行赋值，见如下示例
                let queryElement = pageTableList.dataEngine.state.getElement("query_field_wrapper_3m0ee1");
                if (queryElement && queryElement.data && queryElement.data.members) {
                    const queryProjectIdModel = queryElement.data.members[0];
                    queryProjectIdModel.props.defaultValue.value = regionIdList;
                }
                let tableCondition = pageTableList.dataEngine.state.getElement("condition_gvucnk");
                if (tableCondition) {
                    tableCondition.onQuery();
                }
            }
        }
    }).catch(err => {
        self.$message.error(err.message); // 显示错误提示信息
    });
}







function main(params) {

    // 节点参数
    console.log(params);

    const pageRootList = this.$$roots();
    let rootPageElement = pageRootList[0];
    // 找到页面中的列表组件元素
    let pageTableList = rootPageElement.$$element("page_widget_list_6fzqcs");
    if (pageTableList) {
        if (pageTableList.dataEngine && pageTableList.dataEngine.state) {
            // 给列表组件设置参数，参数名meter_id为要过滤列表中的列名，后面为参数值，取自树节点参数
            pageTableList.$children[0].$$setExtraParams({
                meter_id: params.id
            })
            // 找到列表部件中的表格组件元素
            let tableComp = pageTableList.dataEngine.state.getElement("table_9yz13r");
            if (tableComp) {
                //执行列表刷新
                tableComp.$$refreshData();
            }
            // 如果要给列表的查询组件传参赋值，需要找到组件的model进行赋值，见如下示例
            // let queryElement = pageTableList.dataEngine.state.getElement("query_field_wrapper_c2ucbt");
            // if (queryElement && queryElement.data && queryElement.data.members) {
            //     const queryProjectIdModel = queryElement.data.members[0];
            //     queryProjectIdModel.props.defaultValue.value = [5, 12];
            // }
            // let tableCondition = pageTableList.dataEngine.state.getElement("condition_d2cmhw");
            // if (tableCondition) {
            //     tableCondition.onQuery();
            // }

        }
    }
}
